package com.itheima.exer.exercise.ex0925;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class NweDate2 {
    public static void main(String[] args) {
        LocalDateTime now = LocalDateTime.of(2015,5,23,6,48,57);
        DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy年MM月dd日 HH:mm:ss");
        String format = now.format(dateTimeFormatter);
        System.out.println(format);
        String str = "2222年12月22日 12:13:21";
        LocalDateTime time = LocalDateTime.parse(str,dateTimeFormatter);
        System.out.println(time);
    }
}
